package com.ck.ips.controller;

import com.ck.common.model.FileType;
import com.ck.core.annotation.LoginRequired;
import com.ck.ips.service.file.FileTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @description: 文件类型controller
 * @author: zhanglei
 * @date: 2019/4/30 16:36
 */
@LoginRequired
@Controller
@RequestMapping(value = "/fileType")
public class FileTypeController {

    @Autowired
    private FileTypeService fileTypeService;

    /**
     * 获取所有的文件类型
     * @return
     */
    @ResponseBody
    @PostMapping("/getAllFileType")
    public Object getAllFileType(){
        List<FileType> fileTypeList = fileTypeService.getAllFileType();
        return fileTypeList;
    }
}
